Improved incremental prime number sieves
نویسنده
چکیده
An algorithm due to Bengalloun that continuously enumerates the primes is adapted to give the rst prime number sieve that is simultaneously sublinear, additive, and smoothly incremental: { it employs only (n= log log n) additions of numbers of size O(n) to enumerate the primes up to n, equalling the performance of the fastest known algorithms for xed n; { the transition from n to n + 1 takes only O(1) additions of numbers of size O(n). (On average, of course, O(1) such additions increase the limit up to which all primes are known from n to n + (log log n)).
منابع مشابه
Two Compact Incremental Prime Sieves
A prime sieve is an algorithm that finds the primes up to a bound n. We say that a prime sieve is incremental, if it can quickly determine if n+1 is prime after having found all primes up to n. We say a sieve is compact if it uses roughly √ n space or less. In this paper we present two new results: • We describe the rolling sieve, a practical, incremental prime sieve that takes O(n log logn) ti...
متن کاملTrading Time for Space in Prime Number Sieves
A prime number sieve is an algorithm that nds the primes up to a bound n. We present four new prime number sieves. Each of these sieves gives new space complexity bounds for certain ranges of running times. In particular, we give a linear time sieve that uses only O(p n=(log log n) 2) bits of space, an O l (n= log log n) time sieve that uses O(n=((log n) l log log n)) bits of space, where l > 1...
متن کاملA Space-eecient Fast Prime Number Sieve
We present a new algorithm that nds all primes up to n using at most O(n= log log n) arithmetic operations and O(n=(log n log log n)) space. This algorithm is an improvement of a linear prime number sieve due to Pritchard. Our new algorithm matches the running time of the best previous prime number sieve, but uses less space by a factor of (log n). In addition, we present the results of our imp...
متن کاملThe binary Goldbach problem with one prime of the form p = k 2 + l 2 + 1
We prove that almost all integers n ≡ 0 or 4 (mod 6) can be written in the form n = p1 + p2, where p1 = k 2 + l + 1 with (k, l) = 1. The proof is an application of the half-dimensional and linear sieves with arithmetic information coming from the circle method and the Bombieri-Vinogradov prime number theorem.
متن کامل